package com.ibsol.model
{
	import com.adobe.cairngorm.model.IModelLocator;
	
	public class DemoModel implements IModelLocator
	{
		private static var instance:DemoModel;
		
		[Bindable]
		public var echoString:String = "";
		public function DemoModel(errorEnforcer:SingletonEnforcer)
		{
			if(errorEnforcer == null){
				throw new Error("You can only have one demoModel.");
			}
		}
		
		public static function getInstance():DemoModel{
			if(instance == null){
				instance = new DemoModel(new SingletonEnforcer());
			}
			return instance;
		}

	}
}
class SingletonEnforcer{}